#include "stdafx.h"
#include "PeerManager.h"

PeerManager::PeerManager()
{
}
PeerManager::~PeerManager()
{
}

void PeerManager::SendPacketToAll(PacketEncoder& encoder)
{
	std::map< UInt32, Peer* >::iterator iter = m_mapItems.begin();
	std::map< UInt32, Peer* >::iterator iterend = m_mapItems.end();
	for (; iter != iterend; iter++)
	{
		singleton<ServerCallbackGate>::instance().SendPacket(iter->second->GetSocketId(),encoder);
	}
}
